package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_advert_position_schedule;

//DAO
public interface U_advert_position_scheduleMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_ADVERT_POSITION_SCHEDULE  WHERE ID = #{id}")
	public ApiU_advert_position_schedule findU_advert_position_scheduleById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_advert_position_schedule")
	public List<ApiU_advert_position_schedule> findU_advert_position_schedules();

	// 添加
	@Insert("INSERT INTO U_ADVERT_POSITION_SCHEDULE (POSITION_ID, START_TIME, END_TIME) VALUES (#{position_id}, #{start_time}, #{end_time})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_advert_position_schedule(ApiU_advert_position_schedule u_advert_position_schedule);

	// 修改
	@Update("UPDATE U_ADVERT_POSITION_SCHEDULE SET POSITION_ID = #{position_id}, START_TIME = #{start_time}, END_TIME = #{end_time} WHERE ID = #{id}")
	public int updateU_advert_position_schedule(ApiU_advert_position_schedule u_advert_position_schedule);

	// 删除
	@Delete("DELETE FROM U_ADVERT_POSITION_SCHEDULE  WHERE ID = #{id}")
	public int deleteU_advert_position_schedule(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
